/*
 * @description:
 * @Author: Song_Bing_Yan
 * @Date: 2023-04-28 14:11:47
 * @LastEditors: Song_Bing_Yan
 * @LastEditTime: 2023-04-28 14:41:45
 */
import { defineConfig } from "vite"
import vue from "@vitejs/plugin-vue"
import path from 'path'
const pathSrc = path.resolve(__dirname, 'src')


export default defineConfig({
  base: '/platform/',
  server: {
    port: 8000,
    host: true,
  },
  plugins: [
    vue(),
  ],
  resolve: {
    alias: {
      vue: 'vue/dist/vue.esm-bundler.js',
      '@': pathSrc,
    },
    extensions: ['.tsx', '.js', '.ts', '.json'],
  },
  build: {
    chunkSizeWarningLimit: 1000, // 提高超大静态资源警告大小
    terserOptions: {
      // 清除console和debugger
      compress: {
        drop_console: true,
        drop_debugger: true,
      },
    },
  },
});
